/**
 * 
 */
package com.vanstone.imgapp.api.img.services;

import java.util.List;

import com.vanstone.fs.api.FileException;
import com.vanstone.fs.local.LocalFSFile;
import com.vanstone.imgapp.api.img.Album;

/**
 * @author shipeng <br />
 *         相册业务API
 */
public interface AlbumService {

  public static final String SERVICE = "albumService";

  /**
   * 添加相册信息
   * 
   * @param categoryID
   * @param title
   * @param content
   * @param tagnames
   * @param coverLocalFSFile
   * @param localFSFiles
   * @return
   * @throws FileException
   */
  Album addAlbum(long categoryID, String title, String brief, String content, List<String> tagnames, LocalFSFile coverLocalFSFile, List<ImageFSBean> imageFSBeans) throws FileException;

  /**
   * 添加相册信息
   * 
   * @param categoryID
   * @param tite
   * @param content
   * @param tagnames
   * @param localFSFiles
   * @return
   * @throws FileException
   */
  Album addAlbum(long categoryID, String tite, String brief, String content, List<String> tagnames, List<ImageFSBean> imageFSBeans, boolean default_first_cover) throws FileException;

  Album getAlbum(long id);

  /**
   * 更新相册基本信息
   * 
   * @param id
   * @param categoryID
   * @param title
   * @param content
   * @param tagnames
   * @return
   */
  Album updateAlbumBaseInfo(long id, String categoryID, String title, String brief, String content, List<String> tagnames);

  /**
   * 更新相册封面信息
   * 
   * @param id
   * @param localFSFile
   * @return
   * @throws FileException
   */
  Album updateAlbunmCoverInfo(long id, LocalFSFile localFSFile) throws FileException;

  /**
   * 删除相册封面图片
   * 
   * @param id
   * @return
   */
  Album deleteAlbumCoverInfo(long id);

  /**
   * 删除相册图片信息
   * 
   * @param id
   * @param fileid
   */
  void deleteAlbumImageFile(long id, String fileid);

  /**
   * 追加相册图片信息
   * 
   * @param id
   * @param localFSFile
   * @return
   * @throws FileException
   */
  Album appendAlbumImageFile(long id, LocalFSFile localFSFile) throws FileException;

  /**
   * 设定图片文件为封面图片
   * 
   * @param id
   * @param fileid
   * @return
   */
  Album setImageFileToCoverFile(long id, String fileid);

  /**
   * 通过栏目ID获取相册信息列表
   * 
   * @param categoryID
   * @param offset
   * @param limit
   * @return
   */
  List<Album> getAlbumsByCategoryID(String categoryID, long offset, long limit);

  /**
   * 通过栏目ID获取相册信息列表
   * 
   * @param categoryID
   * @return
   */
  List<Album> getTotalAlbumsByCategoryID(String categoryID);

  /**
   * 通过标签获取相册信息列表
   * 
   * @param tagID
   * @param offset
   * @param limit
   * @return
   */
  List<Album> getAlbumsByTagID(long tagID, long offset, long limit);

  /**
   * 通过标签获取相册信息列表
   * 
   * @param tagID
   * @param offset
   * @param limit
   * @return
   */
  List<Album> getTotalAlbumsByTagID(long tagID, long offset, long limit);
}
